module.exports = app => {
    const { router, controller, config, middleware } = app;
    const isadmin = middleware.isadmin();
    //登录状态判断
    router.get('/admin/islogin',controller.admin.islogin);
    //登录接口
    router.post('/admin/login',controller.admin.login);
    //注册
    router.post('/admin/add',controller.admin.add);
    //添加用户管理员
    router.post('/admin/addadmin',controller.admin.addadmin);
    //登出接口
    router.get('/admin/outlogin',controller.admin.outlogin);

    //根基id修改信息
    router.post('/admin/upAdminAll',isadmin,controller.admin.upAdminAll);

     //根基id删除信息
     router.post('/admin/deleteAdmin',isadmin,controller.admin.deleteAdmin);


    //分页查询账号类型
    router.post('/admin/pageAdmin',isadmin,controller.admin.pageAdmin);

    //分页查询账号类型加侧边栏
    router.post('/admin/pageAuthority',isadmin,controller.admin.pageAuthority);


    //代理修改密码
    router.post('/admin/upassword',controller.admin.upassword);
    //查询枚举表内容
    router.get('/admin/requeOther',controller.other.requeOther);
    //根据商户id查询商户内容
    router.get('/admin/requeAdminid',controller.admin.requeAdminid);
    //查询账户总体数据的
    router.get('/admin/requeAdminData',isadmin,controller.admin.requeAdminData);
    //检查名字是否可用
    router.get('/admin/isAdminName',controller.admin.isAdminName);
    //修改信息
    router.post('/admin/updateadmin',isadmin,controller.admin.updateadmin);
    //获取商户列表信息
    router.post('/admin/gets',controller.admin.gets);
    //获取商户信息
    router.post('/admin/getbyid',controller.admin.getbyid);
    //微信端查询账户总体数据的
    router.get('/admin/requewxAdminData',isadmin,controller.admin.requewxAdminData);
};
  